import { movieMapper } from "@/mapper/movie.mapper";
import { Result } from "@/utils/result";
import { Context } from "koa";

class MovieService {
    async getMovies(ctx: Context, next) {
        const movie = await movieMapper.getMovieBy("ikun");

        // 这里采用方式：dto 把 vo 干碎，全在 service 层响应前端。
        Result.ok(ctx, movie, "电影获取成功");
    }
}

const movieService = new MovieService();
export { movieService };
